Skip to content

Conversation

@mbtools
Copy link
Contributor

@mbtools mbtools commented May 19, 2025

When running on Windows with a repo that uses LF as EOL, the codemod converts all LF to CRLF leading to unwanted diffs (diffs on 804 files in our Verdaccio repo).

This PR detects the EOL used in modified files and passes it as an option to jscodeshift (which will pass it to recast).

Signed-off-by: Sebastian Beltran <[email protected]>
Copy link
Member

@bjohansebas bjohansebas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the PR! I’d like to know if you could try adding tests to verify the behavior, no problem if you can’t.

@mbtools
Copy link
Contributor Author

mbtools commented May 31, 2025

Vacation. In a couple weeks I can get to it ☀️🌴🌊

@mbtools
Copy link
Contributor Author

mbtools commented Jun 1, 2025

i found a minute and added some tests for the EOL detection. not sure if you want to do more for testing the transforms?

Signed-off-by: Sebastian Beltran <[email protected]>
Copy link
Member

@bjohansebas bjohansebas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@bjohansebas bjohansebas merged commit 56ceeb2 into expressjs:main Jun 1, 2025
23 checks passed
@bjohansebas bjohansebas mentioned this pull request Jun 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants